package com.yt.order.provider.dao.impl;

import com.yt.core.dao.GenericDaoImpl;
import com.yt.order.api.model.Institution;
import com.yt.order.api.model.ProductInstitution;
import com.yt.order.provider.dao.ProductInstitutionDao;

import java.util.List;

/**
 * Created by liujunshi on 16-1-22.
 */
public class ProductInstitutionDaoImpl extends GenericDaoImpl<ProductInstitution, Long> implements ProductInstitutionDao {
	public ProductInstitutionDaoImpl() {
		setNameSpace("com.yt.order.productinstitution");
	}

	@Override
	public List<Institution> getInstitutionByProductId(Long productId) {
		return this.getSqlSession().selectList(this.getNameSpace() + ".getInstitutionByProductId", productId);
	}
}
